package com.blog4j.user.utils;

import com.blog4j.user.mapper.UserMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 98k灬
 * @version v1.0.0
 * @Description : 功能描述
 * @Create on : 2024/7/30 12:17
 **/
@Component
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class UserUtil {
    private final UserMapper userMapper;

    /**
     * 获取当前的用户记录数
     *
     * @return 当前的用户记录数
     */
    public int getUserSize() {
        return userMapper.selectCount(null);
    }
}
